package com.aspose.cells;

class zmx extends zmt {
   private zaay d;
   private double e;
   private boolean f;
   private boolean g;
   private boolean h;

   zmx(zaay var1, zzn var2, double var3) {
      super(var1, var2);
      this.d = var1;
      this.e = var3;
      if (zfc.a(var3)) {
         this.g = true;
         this.f = false;
         this.h = false;
      } else {
         this.g = false;
         if (zfc.a(var3, 1.0D)) {
            this.f = true;
            this.h = false;
         } else {
            this.f = false;
            this.h = var3 < 0.0D;
         }
      }

   }

   zmx(zaay var1, zzn var2) {
      super(var1, var2);
      this.d = var1;
      this.g = true;
      this.f = false;
      this.h = false;
   }

   public int a() {
      return 3;
   }

   public zagu b() {
      if (this.g) {
         return zyy.a;
      } else {
         return this.f ? zyy.b : new zyy(this.e);
      }
   }

   public boolean a(zagu var1) {
      if (var1.b() == 3) {
         return this.b(var1);
      } else if (this.b && var1.b() == 2) {
         zyy var2 = zaaq.a(((zaam)var1).k(), this.d);
         return var2 != null ? zfc.a(var2.k(), this.e) : false;
      } else {
         return this.c;
      }
   }

   public boolean b(zagu var1) {
      return this.a.a(this.c(var1));
   }

   public int c(zagu var1) {
      double var2 = ((zyy)var1).k();
      if (Math.abs(var2 - this.e) < Double.MIN_VALUE) {
         return 0;
      } else {
         return var2 > this.e ? 1 : -1;
      }
   }

   static int a(zagu var0, double var1, zaay var3) {
      switch(var0.b()) {
      case 1:
         if (var3.d.n()) {
            return a(((zyv)var0).k() ? 1.0D : 0.0D, var1);
         }

         return 1;
      case 2:
         if (var3.d.n()) {
            return a(0.0D, var1);
         }

         return 1;
      case 3:
         return a(((zyy)var0).k(), var1);
      case 12:
         if (zfc.a(var1)) {
            return 0;
         } else {
            if (var1 > 0.0D) {
               return -1;
            }

            return 1;
         }
      default:
         if (var3.p.Q.i.a) {
            com.aspose.cells.a.c.zl.a("Unsupported node type to compare with Number: " + var0.b());
         }

         return -1;
      }
   }

   static int a(double var0, double var2) {
      if (zfc.a(var0, var2)) {
         return 0;
      } else {
         return var0 > var2 ? 1 : -1;
      }
   }

   static boolean b(zagu var0, double var1, zaay var3) {
      switch(var0.b()) {
      case 0:
         return false;
      case 1:
         if (var3.d.n()) {
            return (((zyv)var0).k() ? 1.0D : 0.0D) == var1;
         }

         return false;
      case 2:
         if (var3.d.n()) {
            return var1 == 0.0D;
         }

         return false;
      case 3:
         double var4 = ((zyy)var0).k();
         return zfc.a(var4, var1) || Math.abs(var4 - var1) <= 1.0E-16D;
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
      default:
         if (var3.p.Q.i.a) {
            com.aspose.cells.a.c.zl.a("Unsupported node type to match Number: " + var0.b());
         }

         return false;
      case 12:
         return zfc.a(var1);
      }
   }
}
